package com.senyin.pathSearchUtil.common;

import static com.senyin.pathSearchUtil.common.ResponseCode.ERROR_CODE;
import static com.senyin.pathSearchUtil.common.ResponseCode.SUCCESS_CODE;

public class ResultResponse {

    public static <T> BaseResponse<T> success  (String message, T data){
        return new BaseResponse<>(SUCCESS_CODE,message,data);
    }

    public static <T> BaseResponse<T> success  (String message){
        return new BaseResponse<>(SUCCESS_CODE,message);
    }

    public static <T> BaseResponse<T> success  (T data){
        return new BaseResponse<>(SUCCESS_CODE, data);
    }

    public static <T> BaseResponse<T> error (String message){
        return new BaseResponse<>(ERROR_CODE,message);
    }
}
